I am looking for a way to get a trigger in Doors to communicate with or run some C# code that I have written (to do some database work, messaging, and other things). It is pretty easy to go the other way (have C# initiate, run, and communicate with some DXL), but I can't seem to find a good way to do it with a trigger/DXL initiating the communication. Ideal Methods that I can't find a way to do: 1) When trigger occurs, run an executable file directly instead of a dxl file 2) When trigger occurs, run a dxl file which then: Runs an executable file directly 3) When trigger occurs, run a dxl file which then: Sets up a socket or some type of network communication with a C# service and tells service to run Non-Ideal methods that I can get to work but would prefer one of the above: 1) Have the trigger DXL modify a text file and have a C# service also monitoring that text file (basically text file communication) 2) Have a C# service hooking/monitoring Doors output looking for 'special output messages' that only come from the trigger DXL output.
Anybody have any experience/tips getting one of the above ideal methods working? Or perhaps a different approach to solving the problem?
Any help or tips would be appreciated! Thanks.
Phippsmx - Mon Oct 21 16:06:42 EDT 2013 |
Re: DXL communication with other code To run an exe, you are looking for:
or to get returned data or/and wait for it to finish:
-Adam
|
Re: DXL communication with other code Adamarla - Tue Oct 22 02:51:41 EDT 2013 To run an exe, you are looking for:
or to get returned data or/and wait for it to finish:
-Adam
Adam is correctly suggesting your Trigger issue one of those commands. Looks like this:
Oddly, I cannot get the wait version to work on my system. -Louie IIRC, the Compec " /c " was for DOS commands (in my case "fc") but not needed when running an EXE. |
Re: DXL communication with other code llandale - Tue Oct 22 12:08:47 EDT 2013 Adam is correctly suggesting your Trigger issue one of those commands. Looks like this:
Oddly, I cannot get the wait version to work on my system. -Louie IIRC, the Compec " /c " was for DOS commands (in my case "fc") but not needed when running an EXE. Hi Louie, Here after an old function made to wait the end of the action launched by the system function. The wait_time_in_sec value is here to put a limit to the waiting phase ...
string command_system (string cmd, int wait_time_in_sec) { Have fun ! |
Re: DXL communication with other code Adamarla - Tue Oct 22 02:51:41 EDT 2013 To run an exe, you are looking for:
or to get returned data or/and wait for it to finish:
-Adam
Thanks for the help. Exactly what I was looking for. |